/**
 * 
 */
package com.ginger;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: SSO服务
 * @author 姜锋
 * @date 2018年12月20日 下午8:07:39 
 * @version V1.0   
 *
 */
@EnableOAuth2Sso
@SpringBootApplication
@RestController
public class GingerSSoApplication {
	
	private   Logger log = LoggerFactory.getLogger(getClass());

    public static void main(String[] args) {
        new SpringApplicationBuilder(GingerSSoApplication.class)
                .run(args);
    }
    // sso测试接口
    @GetMapping("/user")
    public Authentication getUser(Authentication authentication) {
        log.info("auth : {}", authentication);
        return authentication;

    }
}
